<?php

namespace App\Exports;

use Illuminate\Support\Facades\Schema;
use Maatwebsite\Excel\Concerns\FromArray;
use Maatwebsite\Excel\Concerns\WithCustomValueBinder;
use PhpOffice\PhpSpreadsheet\Cell\DefaultValueBinder;

abstract class CommonExport extends DefaultValueBinder implements FromArray,WithCustomValueBinder
{
    protected $instance;
    protected $conditions;
    protected $title;
    protected $records;
    protected $params = [];//额外需要传入的参数

    protected function getAllCols(){
        return Schema::getColumnListing($this->instance->getTable());
    }

}
